Component({
  data: {
    selected: 0,
    color: "#777777",
    selectedColor: "#0983FF"
  },
  methods: {
    switchTab(data) {
		let  list =  [{
		  pagePath: "/pages/reserve/index",
		  text: "预定",
		}, {
		 pagePath: "/pages/goods/index",
		 text: "商城",
		}, {
		 pagePath: "/pages/groupBuy/index",
		 text: "房券",
		},{
		 pagePath: "/pages/orderList/index",
		 text: "订单",
		},{
		 pagePath: "/pages/my/index",
		 text: "我的",
		}]
      const index = Number(data.currentTarget.dataset.index)
      const url = list[index].pagePath
      my.switchTab({url:url})
      this.setData({
        selected: index
      })
    }
  }
})